
#include "hw_config.h"

//unsigned char pattern[8] = {0xFE, 0xFD, 0xFB, 0xF7, 0xEF, 0xDF, 0xBF, 0x7F}; // up
unsigned char pattern[8]={0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01};  // down

int main(void)
{
	CLI();

	unsigned int i = 0, j;

	DDRA=0xFF;
	DDRB=0xFF;
	PORTA=0x80 >> i;
	PORTB = pattern[i];


	while(1)
	{
		for(j=0;j<6;j++)
		{
			_delay_ms(150);			
			if(++i == 8) i = 0;
			PORTA=0x80 >> i;
			PORTB = pattern[i];	
		}
	}
	return 1;

}
